package chapter11;

public class NewThread2 extends Thread{
	
	NewThread2(){
		super("Demo Thread");
		System.out.println("Demo Thread");
		start();		
	}
	
	public void run(){
		try{
			for(int i=5; i < 0;i--){
				System.out.println("Child Thread " + i);
				Thread.sleep(500);				
			}
		}catch(InterruptedException e){
			System.out.println("Exiting child thread");
		}
	}

}
